﻿using System;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002B3 RID: 691
	public class TDataChangeTable : TParseTreeNode
	{
		// Token: 0x170004DE RID: 1246
		// (get) Token: 0x0600176F RID: 5999 RVA: 0x003281DD File Offset: 0x003263DD
		// (set) Token: 0x06001770 RID: 6000 RVA: 0x003281E5 File Offset: 0x003263E5
		public virtual TCustomSqlStatement Stmt
		{
			get
			{
				return this.stmt;
			}
			set
			{
				this.stmt = value;
			}
		}

		// Token: 0x06001771 RID: 6001 RVA: 0x003281EE File Offset: 0x003263EE
		public override void init(object arg1)
		{
			this.sqlNode = (TParseTreeNode)arg1;
		}

		// Token: 0x06001772 RID: 6002 RVA: 0x003281FC File Offset: 0x003263FC
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.sqlNode is TDeleteSqlNode)
			{
				this.stmt = new TDeleteSqlStatement(psql.dbvendor);
			}
			else if (this.sqlNode is TInsertSqlNode)
			{
				this.stmt = new TInsertSqlStatement(psql.dbvendor);
			}
			else if (this.sqlNode is TUpdateSqlNode)
			{
				this.stmt = new TUpdateSqlStatement(psql.dbvendor);
			}
			if (this.stmt != null)
			{
				this.stmt.rootNode = this.sqlNode;
				this.stmt.doParseStatement(psql);
			}
		}

		// Token: 0x0400180B RID: 6155
		private TParseTreeNode sqlNode;

		// Token: 0x0400180C RID: 6156
		private TCustomSqlStatement stmt;
	}
}
